home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / earthlink / nscomm / java40.jar / netscape / applet / EmbeddedBeanTracker.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  2.7 KB  |  90 lines

  1. package netscape.applet;
  2.  
  3. import java.awt.Frame;
  4. import java.net.URL;
  5. import netscape.application.Application;
  6. import netscape.application.Color;
  7. import netscape.application.FoundationPanel;
  8. import netscape.application.Rect;
  9. import netscape.application.RootView;
  10. import netscape.util.Enumeration;
  11.  
  12. public class EmbeddedBeanTracker {
  13.    EmbeddedObject eop;
  14.  
  15.    EmbeddedBeanTracker(EmbeddedObject var1) {
  16.       this.eop = var1;
  17.    }
  18.  
  19.    public String className() {
  20.       return this.eop.className;
  21.    }
  22.  
  23.    public URL documentURL() {
  24.       return this.eop.documentURL();
  25.    }
  26.  
  27.    public URL codebaseURL() {
  28.       return this.eop.codebaseURL();
  29.    }
  30.  
  31.    public String attribute(String var1) {
  32.       return (String)this.eop.attributes().get(var1.toLowerCase());
  33.    }
  34.  
  35.    public String parameter(String var1) {
  36.       return (String)this.eop.parameters().get(var1.toLowerCase());
  37.    }
  38.  
  39.    public Enumeration parameterKeys() {
  40.       return this.eop.parameters().keys();
  41.    }
  42.  
  43.    public Enumeration parameterValues() {
  44.       return this.eop.parameters().elements();
  45.    }
  46.  
  47.    public Application application() {
  48.       return this.eop.task.application();
  49.    }
  50.  
  51.    public Rect bounds() {
  52.       return new Rect(0, 0, this.eop.width, this.eop.height);
  53.    }
  54.  
  55.    public void setActualObject(Object var1) {
  56.       this.eop.actualObject = var1;
  57.    }
  58.  
  59.    public Object getActualObject() {
  60.       return this.eop.actualObject;
  61.    }
  62.  
  63.    public Frame frame() {
  64.       return this.eop.frame;
  65.    }
  66.  
  67.    public synchronized RootView rootView() {
  68.       if (this.eop.frame == null) {
  69.          return null;
  70.       } else if (this.eop.panel != null) {
  71.          return this.eop.panel.rootView();
  72.       } else {
  73.          this.eop.panel = new FoundationPanel();
  74.          this.eop.panel.rootView().setColor(Color.lightGray);
  75.          this.eop.panel.resize(this.eop.width, this.eop.height);
  76.          this.eop.frame.add(this.eop.panel);
  77.          this.eop.frame.validate();
  78.          return this.eop.panel.rootView();
  79.       }
  80.    }
  81.  
  82.    public EmbeddedBeanOwner systemDefaultBeanOwner() {
  83.       return EmbeddedObject.defaultBeanOwner;
  84.    }
  85.  
  86.    public EmbeddedBeanOwner programDefaultBeanOwner() {
  87.       return this.eop.taskOwner.beanOwner;
  88.    }
  89. }
  90.